import React, { useState, useEffect } from 'react';
import request from "@/utils/request";
import { GridItem, Image, Stepper } from 'react-vant'
import { connect } from 'react-redux'

// 商品详情页
const OrderDetail = (props) => {

    // 单个商品详情
    const { dishes } = props;

    return (
        <div className='orderDetail'>
            <Image src={dishes.dishes_img} width='100%' height='40vh' fit='cover' />
            <h4>{dishes.dishes_name}</h4>
            {
                dishes.sales_price
                    ?
                    <p>
                        原价:<del>￥{dishes.price}</del>
                        <span className='salesPrice'>优惠价:￥{dishes.sales_price}</span>
                    </p>
                    :
                    <p>
                        价格:<span>￥{dishes.price}</span>
                    </p>
            }
            <h4>月销:{dishes.dishes_qty}</h4>
        </div>
    )
}

export default OrderDetail